1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, an image processing program and an imaging apparatus, which correct an image whose image quality, including contrast and colors, is impaired by the haze, fog, or the like.
2. Description of the Related Art
The image quality of an image, including contrast and colors, may be impaired by the haze or fog generated in the atmosphere. For example, a landscape photograph of a distant mountain may be taken outdoors. If the distant mountain is in mist, the photographed image is degraded by the mist, and the distant mountain may not be clearly recognized in the photograph.
Jpn. Pat. Appln. KOKAI Publication No. 2012-054659 and Jpn. Pat. Appln. KOKAI Publication No. 2010-152536 (Japanese Patent No. 4982475) propose technology for solving the problem. According to Jpn. Pat. Appln. KOKAI Publication No. 2012-054659, a maximal brightness value and a minimal brightness value are calculated based on an image, and contrast correction is made in such a manner as to increase the difference between the calculated maximal and minimal brightness values, thereby improving the recognizability of the image. If the image of the photograph is entirely in mist, the technique disclosed in Jpn. Pat. Appln. KOKAI Publication No. 2012-054659 can satisfactorily improve the recognizability of the image.
According to Jpn. Pat. Appln. KOKAI Publication No. 2010-152536, a maximal brightness value and a minimal brightness value are calculated for each of local areas of an image, and adaptive contrast correction is made in such a manner as to increase the difference between the calculated maximal and minimal brightness values. Jpn. Pat. Appln. KOKAI Publication No. 2010-152536 enables sufficient contrast correction to be made to improve the recognizability of the image even if the image includes both a mist portion and a non-mist portion.